
<script setup lang="ts">
import { useRoute,useRouter } from 'vue-router';

const router =  useRouter()
function navTo(){
  //router.push("/home")
  router.replace("/home")
}
const route = useRoute()
console.log(route.query.age)
</script>

<template>
  <h1>222</h1>
  <router-link to="/home?age=12"></router-link>
  <button @click="navTo">跳转home</button>
  <router-view ></router-view>

</template>



<style scoped>

</style>
